package cn.community.system.mapper;

import cn.community.system.domain.Member;
import cn.community.system.domain.MemberVo;
import cn.community.system.query.QueryObject;
import cn.community.system.vo.AssoMemberVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemberMapper {
    int deleteByPrimaryKey(Long id);

    Long insert(Member member);

    Member selectByPrimaryKey(Long id);

    List<Member> selectAll();

    int updateByPrimaryKey(Member member);

    List<AssoMemberVo> selectForList(QueryObject qo);

    List<AssoMemberVo> selectForAssoList(QueryObject qo);

    // 通过手机号找用户信息
    Member findByPhone(String phone);

    Member selectByName(String username);

    Member selectByNameAndPassword(String username,String password);

    void insertRelation(@Param("mid") Long mid, @Param("rid") Long rid);

    void deleteRelation(Long id);

    void deleteBatch(Long[] ids);

    void updateActivitiesAndTime(Member member);

    Member getUserByNumber(String number);

    List<AssoMemberVo> selectVoAll();

    List<AssoMemberVo> selectVoAll2(Long id);

    void myUpdate(Member member);

}
